#ifndef SOUND_SOUNDSYSTEMPROXY_H_
#define SOUND_SOUNDSYSTEMPROXY_H_

#include "base/basictypes.h"  // for NULL
#include "sound/soundsysteminterface.h"

namespace cricket {

	// A SoundSystemProxy is a sound system that defers to another one.
	// Init(), Terminate(), and GetName() are left as pure virtual, so a sub-class
	// must define them.
	class SoundSystemProxy : public SoundSystemInterface {
	public:
		SoundSystemProxy() : wrapped_(NULL) {}

		// Each of these methods simply defers to wrapped_ if non-NULL, else fails.

		virtual bool EnumeratePlaybackDevices(SoundDeviceLocatorList *devices);
		virtual bool EnumerateCaptureDevices(SoundDeviceLocatorList *devices);

		virtual bool GetDefaultPlaybackDevice(SoundDeviceLocator **device);
		virtual bool GetDefaultCaptureDevice(SoundDeviceLocator **device);

		virtual SoundOutputStreamInterface *OpenPlaybackDevice(
			const SoundDeviceLocator *device,
			const OpenParams &params);
		virtual SoundInputStreamInterface *OpenCaptureDevice(
			const SoundDeviceLocator *device,
			const OpenParams &params);

	protected:
		SoundSystemInterface *wrapped_;
	};

}  // namespace cricket

#endif  // SOUND_SOUNDSYSTEMPROXY_H_
